<?php defined('_JEXEC') or die('Restricted access'); ?>
<?php jimport( 'joomla.html.editor' ); $editor =& JFactory::getEditor(); ?>
<?php jimport( 'joomla.html.html' ); ?>
<?php $data =& $this->data; ?>
<script type="text/javascript">

	function submitbutton(pressbutton)	{
		var form = document.adminForm;
	
		if (pressbutton == 'cancel') {
			submitform( pressbutton );
			return;
		}
	
		// remove this code
		alert ('<?php echo 'Remember to add js check in ' . __FILE__ . ' after line n. ' . __LINE__; ?>');
		submitform( pressbutton );
		return;
		// end remove this code
	
		// do field validation
		if (form.My_Field_Name.value == "") {
			alert( "<?php echo JText::_( 'Field must have a name', true ); ?>" );
		} else if (form.My_Field_Name.value.match(/[a-zA-Z0-9]*/) != form.My_Field_Name.value) {
			alert( "<?php echo JText::_( 'Field name contains bad caracters', true ); ?>" );
		} else if (form.My_Field_Name_typefield.options[form.My_Field_Name_typefield.selectedIndex].value == "0") {
			alert( "<?php echo JText::_( 'You must select a field type', true ); ?>" );		
		} else {
			submitform( pressbutton );
		}
	}

</script>

<form action="index.php" method="post" name="adminForm" id="adminForm">
<div class="col100">
	<fieldset class="adminform">
		<legend><?php echo JText::_( 'DETAILS' ); ?></legend>
		<table class="admintable">
<!-- jcb code -->
<tr>
	<td width="100" align="right" class="key">
		<label for="provices_id">
			<?php echo JText::_( 'PROVICES_ID' ); ?>:
		</label>
	</td>
	<td>
		<input class="text_area" type="text" name="provices_id" id="provices_id" size="32" maxlength="20" value="<?php echo htmlspecialchars($this->data->provices_id, ENT_COMPAT, 'UTF-8');?>" />
	</td>
</tr>
<tr>
	<td width="100" align="right" class="key">
		<label for="estatetype_id">
			<?php echo JText::_( 'ESTATETYPE_ID' ); ?>:
		</label>
	</td>
	<td>
		<input class="text_area" type="text" name="estatetype_id" id="estatetype_id" size="32" maxlength="20" value="<?php echo htmlspecialchars($this->data->estatetype_id, ENT_COMPAT, 'UTF-8');?>" />
	</td>
</tr>
<tr>
	<td width="100" align="right" class="key">
		<label for="min_price">
			<?php echo JText::_( 'MIN_PRICE' ); ?>:
		</label>
	</td>
	<td>
		<input class="text_area" type="text" name="min_price" id="min_price" size="32" maxlength="20" value="<?php echo htmlspecialchars($this->data->min_price, ENT_COMPAT, 'UTF-8');?>" />
	</td>
</tr>
<tr>
	<td width="100" align="right" class="key">
		<label for="max_price">
			<?php echo JText::_( 'MAX_PRICE' ); ?>:
		</label>
	</td>
	<td>
		<input class="text_area" type="text" name="max_price" id="max_price" size="32" maxlength="20" value="<?php echo htmlspecialchars($this->data->max_price, ENT_COMPAT, 'UTF-8');?>" />
	</td>
</tr>
<tr>
	<td width="100" align="right" class="key">
		<label for="fullname_poster">
			<?php echo JText::_( 'FULLNAME_POSTER' ); ?>:
		</label>
	</td>
	<td>
		<input class="text_area" type="text" name="fullname_poster" id="fullname_poster" size="32" maxlength="100" value="<?php echo htmlspecialchars($this->data->fullname_poster, ENT_COMPAT, 'UTF-8');?>" />
	</td>
</tr>
<tr>
	<td width="100" align="right" class="key">
		<label for="phone_poster">
			<?php echo JText::_( 'PHONE_POSTER' ); ?>:
		</label>
	</td>
	<td>
		<input class="text_area" type="text" name="phone_poster" id="phone_poster" size="32" maxlength="20" value="<?php echo htmlspecialchars($this->data->phone_poster, ENT_COMPAT, 'UTF-8');?>" />
	</td>
</tr>
<tr>
	<td width="100" align="right" class="key">
		<label for="email_poster">
			<?php echo JText::_( 'EMAIL_POSTER' ); ?>:
		</label>
	</td>
	<td>
		<input class="text_area" type="text" name="email_poster" id="email_poster" size="32" maxlength="80" value="<?php echo htmlspecialchars($this->data->email_poster, ENT_COMPAT, 'UTF-8');?>" />
	</td>
</tr>
<tr>
	<td width="100" align="right" class="key">
		<label for="status">
			<?php echo JText::_( 'STATUS' ); ?>:
		</label>
	</td>
	<td>
		<input class="text_area" type="text" name="status" id="status" size="32" maxlength="1" value="<?php echo htmlspecialchars($this->data->status, ENT_COMPAT, 'UTF-8');?>" />
	</td>
</tr>
<tr>
	<td width="100" align="right" class="key">
		<label for="note">
			<?php echo JText::_( 'NOTE' ); ?>:
		</label>
	</td>
	<td>
		<textarea class="text_area" name="note" id="note" cols="80" rows="10"><?php echo htmlspecialchars($this->data->note, ENT_COMPAT, 'UTF-8');?></textarea>
	</td>
</tr>
<!-- jcb code -->

		</table>
	</fieldset>
</div>
<div class="clr"></div>

<input type="hidden" name="option" value="com_mcm" />
<input type="hidden" name="id" value="<?php echo $this->data->id; ?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="controller" value="huhudangtinmoigioi" />
</form>
